<?php require_once("../webassist/ckeditor/ckeditor.php"); ?>
<?php require_once("../webassist/form_validations/wavt_scripts_php.php"); ?>
<?php require_once("../webassist/form_validations/wavt_validatedform_php.php"); ?>
<?php require_once('../Connections/elevate954.php'); ?>
<?php 
if ((isset($_POST["Update"]) || isset($_POST["Update_x"])))  {
  $WAFV_Redirect = "".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES))  ."?invalid=true";
  $_SESSION['WAVT_productsupdate_Errors'] = "";
  if ($WAFV_Redirect == "")  {
    $WAFV_Redirect = $_SERVER["PHP_SELF"];
  }
  $WAFV_Errors = "";
  $WAFV_Errors .= WAValidateRQ((isset($_POST["ProductName"])?$_POST["ProductName"]:"") . "",true,1);
  $WAFV_Errors .= WAValidateNM((isset($_POST["ProductPrice"])?$_POST["ProductPrice"]:"") . "","","",2,",.",true,2);
  $WAFV_Errors .= WAValidateNM((isset($_POST["ProductRetailPrice"])?$_POST["ProductRetailPrice"]:"") . "","","",2,",.",false,3);
  $WAFV_Errors .= WAValidateNM((isset($_POST["ProductWeight"])?$_POST["ProductWeight"]:"") . "","","","",",.",false,4);

  if ($WAFV_Errors != "")  {
    PostResult($WAFV_Redirect,$WAFV_Errors,"productsupdate");
  }
}
?>
<?php require_once("../webassist/file_manipulation/helperphp.php"); ?>
<?php require_once("../webassist/database_management/wa_appbuilder_php.php"); ?>
<?php require_once( "../webassist/security_assist/helper_php.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Logged in to ADMIN_SETTINGS")){
	WA_Auth_RestrictAccess("../login_admin.php");
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
?>
<?php
$ParamProductID_WADAProducts = "-1";
if (isset($_GET['ProductID'])) {
  $ParamProductID_WADAProducts = $_GET['ProductID'];
}
mysql_select_db($database_elevate954, $elevate954);
$query_WADAProducts = sprintf("SELECT ProductID, ProductSKU, ProductName, Product_Cat_id, ProductPrice, ProductRetailPrice, ProductWeight, ProductShortDesc, ProductLongDesc, ProductThumb, ProductImage, ProductLive, ProductTitle, ProductMetaKeywords, ProductMetaDescription FROM Products WHERE ProductID = %s", GetSQLValueString($ParamProductID_WADAProducts, "int"));
$WADAProducts = mysql_query($query_WADAProducts, $elevate954) or die(mysql_error());
$row_WADAProducts = mysql_fetch_assoc($WADAProducts);
$totalRows_WADAProducts = mysql_num_rows($WADAProducts);
?>
<?php
mysql_select_db($database_elevate954, $elevate954);
$query_WADAMenuProduct_Cat_id = "SELECT name, product_cat_id FROM product_cat";
$WADAMenuProduct_Cat_id = mysql_query($query_WADAMenuProduct_Cat_id, $elevate954) or die(mysql_error());
$row_WADAMenuProduct_Cat_id = mysql_fetch_assoc($WADAMenuProduct_Cat_id);
$totalRows_WADAMenuProduct_Cat_id = mysql_num_rows($WADAMenuProduct_Cat_id);
?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
	'UploadFolder' => "../images/products",
	'FileName' => "[FileName]",
	'DefaultFileName' => "".($row_WADAProducts["ProductThumb"])  ."",
	'ResizeType' => "0",
	'ResizeWidth' => "0",
	'ResizeHeight' => "0",
	'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
// WA_UploadResult2 Params Start
$WA_UploadResult2_Params = array();
// WA_UploadResult2_1 Start
$WA_UploadResult2_Params["WA_UploadResult2_1"] = array(
	'UploadFolder' => "../images/products",
	'FileName' => "[FileName]",
	'DefaultFileName' => "".($row_WADAProducts["ProductImage"])  ."",
	'ResizeType' => "0",
	'ResizeWidth' => "0",
	'ResizeHeight' => "0",
	'ResizeFillColor' => "" );
// WA_UploadResult2_1 End
// WA_UploadResult2 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Update"]) || isset($_POST["Update_x"])){
	WA_DFP_UploadFiles("WA_UploadResult1", "ProductThumb", "0", "", "false", $WA_UploadResult1_Params);
}
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult2");
if(isset($_POST["Update"]) || isset($_POST["Update_x"])){
	WA_DFP_UploadFiles("WA_UploadResult2", "ProductImage", "0", "", "false", $WA_UploadResult2_Params);
}
?>
<?php 
// WA DataAssist Update
if (isset($_POST["Update"]) || isset($_POST["Update_x"])) // Trigger
{
  $WA_connection = $elevate954;
  $WA_table = "Products";
  $WA_redirectURL = "products_detail.php?ProductID=".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"")  ."".(isset($_GET["pageNum_WADAProducts"])?"&pageNum_WADAProducts=".intval($_GET["pageNum_WADAProducts"]):"")  ."";
  if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
  $WA_keepQueryString = false;
  $WA_indexField = "ProductID";
  $WA_fieldNamesStr = "ProductSKU|ProductName|Product_Cat_id|ProductPrice|ProductRetailPrice|ProductWeight|ProductShortDesc|ProductLongDesc|ProductThumb|ProductImage|ProductLive|ProductTitle|ProductMetaKeywords|ProductMetaDescription";
  $WA_fieldValuesStr = "".((isset($_POST["ProductSKU"]))?$_POST["ProductSKU"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ProductName"]))?$_POST["ProductName"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["Product_Cat_id"]))?$_POST["Product_Cat_id"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ProductPrice"]))?$_POST["ProductPrice"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ProductRetailPrice"]))?$_POST["ProductRetailPrice"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ProductWeight"]))?$_POST["ProductWeight"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ProductShortDesc"]))?$_POST["ProductShortDesc"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ProductLongDesc"]))?$_POST["ProductLongDesc"]:"")  ."" . $WA_AB_Split . "".($WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"])  ."" . $WA_AB_Split . "".($WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"])  ."" . $WA_AB_Split . "".((isset($_POST["ProductLive"]))?$_POST["ProductLive"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ProductTitle"]))?$_POST["ProductTitle"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ProductMetaKeywords"]))?$_POST["ProductMetaKeywords"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ProductMetaDescription"]))?$_POST["ProductMetaDescription"]:"")  ."";
  $WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''";
  $WA_comparisonStr = " LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE ";
  $WA_fieldNames = explode("|", $WA_fieldNamesStr);
  $WA_fieldValues = explode($WA_AB_Split, $WA_fieldValuesStr);
  $WA_columns = explode("|", $WA_columnTypesStr);
  
  $WA_where_fieldValuesStr = "".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"")  ."";
  $WA_where_columnTypesStr = "',none,''";
  $WA_where_comparisonStr = "=";
  $WA_where_fieldNames = explode("|", $WA_indexField);
  $WA_where_fieldValues = explode($WA_AB_Split, $WA_where_fieldValuesStr);
  $WA_where_columns = explode("|", $WA_where_columnTypesStr);
  $WA_where_comparisons = explode("|", $WA_where_comparisonStr);
  
  $WA_connectionDB = $database_elevate954;
  mysql_select_db($WA_connectionDB, $WA_connection);
  @session_start();
  $updateParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
  $WhereObj = WA_AB_generateWhereClause($WA_where_fieldNames, $WA_where_columns, $WA_where_fieldValues,  $WA_where_comparisons );
  $WA_Sql = "UPDATE `" . $WA_table . "` SET " . $updateParamsObj->WA_setValues . " WHERE " . $WhereObj->sqlWhereClause . "";
  $MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
  if ($WA_redirectURL != "")  {
    if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
      $WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
    }
    header("Location: ".$WA_redirectURL);
  }
}
?>
<!doctype html>
<html><!-- InstanceBegin template="/Templates/ADMIN BACKEND.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable -->
<link rel="stylesheet" type="text/css" href="style/style.css" />
	<link rel="stylesheet" type="text/css" href="style/fluid.css" title="fluid" media="screen" />
        
	<title>Chameleon Circuit | Admin Panel from Themio</title>
        <script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script>

        <script type="text/javascript" src="js/excanvas.min.js"></script>
        <script type="text/javascript" src="js/jquery.flot.min.js"></script>
        <script type="text/javascript" src="js/jquery.flot.pie.min.js"></script>
        <script type="text/javascript" src="js/jquery.flot.stack.min.js"></script>

        <script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
        <script type="text/javascript" src="js/jquery.labelify.js"></script>
        <script type="text/javascript" src="js/iphone-style-checkboxes.js"></script>
        <script type="text/javascript" src="js/jquery.ui.selectmenu.js"></script>
        <script type="text/javascript" src="js/vanadium-min.js"></script>
        <script type="text/javascript" src="js/jquery.cleditor.min.js"></script>
        <script type="text/javascript" src="js/superfish.js"></script>
        <script type="text/javascript" src="js/jquery.colorbox-min.js"></script>
        <script type="text/javascript" src="js/styleswitch.js"></script>

        <script type="text/javascript" src="js/fullcalendar.min.js"></script>
        <script type="text/javascript" src="js/jquery.uploadify.v2.1.4.min.js"></script>
        <script type="text/javascript" src="js/uploadify.js"></script>
        <script type="text/javascript" src="js/jquery.tipsy.js"></script>

        <script type="text/javascript" src="js/gcal.js"></script>
        <script type="text/javascript" src="js/swfobject.js"></script>
        <script type="text/javascript" src="js/jquery.pnotify.min.js"></script>
        <script type="text/javascript" src="js/examples.js"></script>

        <script type="text/javascript" src="js/sidemenu.js">// Strictly for sidebar </script>

        <!-- Toolbar for Demo Only -->
        <link rel="stylesheet" type="text/css" href="demo/toolbar.css" />
        <link rel="stylesheet" media="screen" type="text/css" href="demo/colorpicker/css/colorpicker.css" />
        <style type="text/css">
        .bodyarea_admin {
	width: 100%;
	margin: 10px
}
        </style>
        <script type="text/javascript" src="demo/colorpicker/js/colorpicker.js"></script>
        <!-- Demo js Only -->
        <script type="text/javascript" src="js/demo.js"></script>
        <!-- InstanceBeginEditable name="head" -->


<script src="../webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>

<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="../webassist/forms/wa_servervalidation.js" type="text/javascript"></script>
<link href="../webassist/forms/fd_basic_default.css" rel="stylesheet" type="text/css">
<link href="../webassist/forms/dataassist_button.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
</head>


<body>
<?php include("s_header.php"); ?>
    <div class="grid_16 widget first">
        <div class="widget_title clearfix">
            <h2>&nbsp;</h2>
        </div>
        <div class="widget_body">
          <div class="widget_content">
          </div>
            <div class="bodyarea_admin" id="bodyarea_admin"><!-- InstanceBeginEditable name="BODY_AREA" -->
<div id="Update_Basic_Default_ProgressWrapper">
<form enctype="multipart/form-data"  class="Basic_Default" id="Update_Basic_Default" name="Update_Basic_Default" method="post" action="<?php echo(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)."?".$_SERVER["QUERY_STRING"]); ?>">
        <fieldset class="Basic_Default" id="Update">
          <legend class="groupHeader">Update</legend>
 <span class="fieldsetDescription">
 Required *
 </span>
    <div class="lineGroup"> <label for="ProductSKU" class="sublabel" > SKU:</label>
                          <div class="errorGroup">
     <span>
  <input id="ProductSKU" name="ProductSKU" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductSKU"):"".$row_WADAProducts["ProductSKU"]."")); ?>" class="formTextfield_Medium" tabindex="1">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductName" class="sublabel" > Name:<span class="requiredIndicator">&nbsp;*</span></label>
                          <div class="errorGroup">
                                        <span id="ProductName_Spry">
     <span>
  <input id="ProductName" name="ProductName" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductName"):"".$row_WADAProducts["ProductName"]."")); ?>" class="formTextfield_Medium" tabindex="2" onBlur="hideServerError('ProductName_ServerError');">
<?php
if (ValidatedField('productsupdate','productsupdate'))  {
  if ((strpos((",".ValidatedField("productsupdate","productsupdate").","), "," . "1" . ",") !== false || "1" == ""))  {
    if (!(false))  {
?><span class="serverInvalidState" id="ProductName_ServerError">Please enter a value.</span><?php //WAFV_Conditional products_update.php productsupdate(1:)
    }
  }
}?>
                                            <span class="textfieldRequiredMsg">Please enter a value.</span>
                                        </span>
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="Product_Cat_id" class="sublabel" > Product_Cat_id:</label>
                          <div class="errorGroup">
     <span>
      <select class="formMenufield_Medium" name="Product_Cat_id" id="Product_Cat_id" tabindex="3">
<?php
do {  
?>
        <option value="<?php echo $row_WADAMenuProduct_Cat_id['product_cat_id']?>"<?php if (!(strcmp($row_WADAMenuProduct_Cat_id['product_cat_id'], (isset($_GET["invalid"])?ValidatedField("productsupdate","Product_Cat_id"):"".$row_WADAProducts["Product_Cat_id"]."")))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADAMenuProduct_Cat_id['name']?></option>
        <?php
} while ($row_WADAMenuProduct_Cat_id = mysql_fetch_assoc($WADAMenuProduct_Cat_id));
  $rows = mysql_num_rows($WADAMenuProduct_Cat_id);
  if($rows > 0) {
      mysql_data_seek($WADAMenuProduct_Cat_id, 0);
	  $row_WADAMenuProduct_Cat_id = mysql_fetch_assoc($WADAMenuProduct_Cat_id);
  }
?>
</select>
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductPrice" class="sublabel" > Price:<span class="requiredIndicator">&nbsp;*</span></label>
                          <div class="errorGroup">
                                        <span id="ProductPrice_Spry">
     <span>
  <input id="ProductPrice" name="ProductPrice" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductPrice"):"".$row_WADAProducts["ProductPrice"]."")); ?>" class="formTextfield_Medium" tabindex="4" onBlur="hideServerError('ProductPrice_ServerError');">
<?php
if (ValidatedField('productsupdate','productsupdate'))  {
  if ((strpos((",".ValidatedField("productsupdate","productsupdate").","), "," . "2" . ",") !== false || "2" == ""))  {
    if (!(false))  {
?><span class="serverInvalidState" id="ProductPrice_ServerError">Please enter a value.</span><?php //WAFV_Conditional products_update.php productsupdate(2:)
    }
  }
}?>
                                            <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldRequiredMsg">Please enter a value.</span>
                                        </span>
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductRetailPrice" class="sublabel" > Retail Price:</label>
                          <div class="errorGroup">
                                        <span id="ProductRetailPrice_Spry">
     <span>
  <input id="ProductRetailPrice" name="ProductRetailPrice" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductRetailPrice"):"".$row_WADAProducts["ProductRetailPrice"]."")); ?>" class="formTextfield_Medium" tabindex="5" onBlur="hideServerError('ProductRetailPrice_ServerError');">
<?php
if (ValidatedField('productsupdate','productsupdate'))  {
  if ((strpos((",".ValidatedField("productsupdate","productsupdate").","), "," . "3" . ",") !== false || "3" == ""))  {
    if (!(false))  {
?><span class="serverInvalidState" id="ProductRetailPrice_ServerError">Please enter a value.</span><?php //WAFV_Conditional products_update.php productsupdate(3:)
    }
  }
}?>
                                            <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldRequiredMsg">Please enter a value.</span>
                                        </span>
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductWeight" class="sublabel" > Weight:</label>
                          <div class="errorGroup">
                                        <span id="ProductWeight_Spry">
     <span>
  <input id="ProductWeight" name="ProductWeight" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductWeight"):"".$row_WADAProducts["ProductWeight"]."")); ?>" class="formTextfield_Medium" tabindex="6" onBlur="hideServerError('ProductWeight_ServerError');">
<?php
if (ValidatedField('productsupdate','productsupdate'))  {
  if ((strpos((",".ValidatedField("productsupdate","productsupdate").","), "," . "4" . ",") !== false || "4" == ""))  {
    if (!(false))  {
?><span class="serverInvalidState" id="ProductWeight_ServerError">Please enter a value.</span><?php //WAFV_Conditional products_update.php productsupdate(4:)
    }
  }
}?>
                                            <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldRequiredMsg">Please enter a value.</span>
                                        </span>
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductShortDesc" class="sublabel" > Short Description:</label>
                          <div class="errorGroup">
     <span><?php
// The initial value to be displayed in the editor.
$CKEditor_initialValue = "".((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductShortDesc",false):"".$row_WADAProducts["ProductShortDesc"].""))  ."";
$CKEditor = new CKEditor();
$CKEditor->basePath = "../webassist/ckeditor/";
$CKEditor_config = array();
$CKEditor_config["wa_preset_name"] = "Normal";
$CKEditor_config["wa_preset_file"] = "Normal.xml";
$CKEditor_config["width"] = "382px";
$CKEditor_config["height"] = "250px";
$CKEditor_config["skin"] = "kama";
$CKEditor_config["dialog_startupFocusTab"] = false;
$CKEditor_config["fullPage"] = false;
$CKEditor_config["tabSpaces"] = 4;
$CKEditor_config["toolbar"] = array(
array( 'Bold','Italic','Underline'),
array( 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
array( 'NumberedList','BulletedList','-','Outdent','Indent'),
array( 'FontName','FontSize'),
array( 'TextColor'));
$CKEditor_config["contentsLangDirection"] = "ltr";
$CKEditor_config["entities"] = false;
$CKEditor_config["pasteFromWordRemoveFontStyles"] = false;
$CKEditor_config["pasteFromWordRemoveStyles"] = false;
$CKEditor->editor("ProductShortDesc", $CKEditor_initialValue, $CKEditor_config);
?>
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductLongDesc" class="sublabel" > Long Description:</label>
                          <div class="errorGroup">
     <span><?php
// The initial value to be displayed in the editor.
$CKEditor_initialValue = "".((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductLongDesc",false):"".$row_WADAProducts["ProductLongDesc"].""))  ."";
$CKEditor = new CKEditor();
$CKEditor->basePath = "../webassist/ckeditor/";
$CKEditor_config = array();
$CKEditor_config["wa_preset_name"] = "Full";
$CKEditor_config["wa_preset_file"] = "Full.xml";
$CKEditor_config["width"] = "514px";
$CKEditor_config["height"] = "350px";
$CKEditor_config["skin"] = "kama";
$CKEditor_config["dialog_startupFocusTab"] = false;
$CKEditor_config["fullPage"] = false;
$CKEditor_config["tabSpaces"] = 4;
$CKEditor_config["toolbar"] = array(
array( 'Cut','Copy','Paste','SpellCheck'),
array( 'Undo','Redo'),
array( 'Bold','Italic','Underline','Subscript','Superscript'),
array( 'NumberedList','BulletedList','-','Outdent','Indent'),
array( 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
array( 'Link','Unlink','Anchor'),
array( 'Table','Rule','SpecialChar'),
array( 'FontName','FontSize'),
array( 'TextColor','BGColor'));
$CKEditor_config["contentsLangDirection"] = "ltr";
$CKEditor_config["entities"] = false;
$CKEditor_config["pasteFromWordRemoveFontStyles"] = false;
$CKEditor_config["pasteFromWordRemoveStyles"] = false;
$CKEditor->editor("ProductLongDesc", $CKEditor_initialValue, $CKEditor_config);
?>
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductThumb" class="sublabel" > Thumbnail Image:</label>
                          <div class="errorGroup">
     <span>
  <input name="ProductThumb" type="file" id="ProductThumb" size="30" tabindex="7">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductImage" class="sublabel" > Full Size Image:</label>
                          <div class="errorGroup">
     <span>
  <input name="ProductImage" type="file" id="ProductImage" size="30" tabindex="8">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> 
                          <div class="errorGroup">
     <span>
<label class="checklabel" for="ProductLive"><input type="checkbox" name="ProductLive" id="ProductLive" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductLive"):"".$row_WADAProducts["ProductLive"].""),"1"))) {echo "checked=\"checked\"";} ?> tabindex="9">&nbsp;Available</label>
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductTitle" class="sublabel" > Page Title:</label>
                          <div class="errorGroup">
     <span>
  <input id="ProductTitle" name="ProductTitle" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductTitle"):"".$row_WADAProducts["ProductTitle"]."")); ?>" class="formTextfield_Medium" tabindex="10">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductMetaKeywords" class="sublabel" > Meta-Keywords:</label>
                          <div class="errorGroup">
     <span>
  <input id="ProductMetaKeywords" name="ProductMetaKeywords" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductMetaKeywords"):"".$row_WADAProducts["ProductMetaKeywords"]."")); ?>" class="formTextfield_Medium" tabindex="11">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ProductMetaDescription" class="sublabel" > Meta-Description:</label>
                          <div class="errorGroup">
     <span>
  <textarea name="ProductMetaDescription" id="ProductMetaDescription" class="formTextarea_Medium" rows="1" cols="1" tabindex="12"><?php echo((isset($_GET["invalid"])?ValidatedField("productsupdate","ProductMetaDescription"):"".$row_WADAProducts["ProductMetaDescription"]."")); ?></textarea>
	   </span>
                          </div>
    </div> 
        <span class="buttonFieldGroup" >
          <input type="submit" value="Update" class="formButton unstyled" id="Update" name="Update" />
        </span>
        </fieldset>
<input type="hidden" name="WADAUpdateRecordID" id="WADAUpdateRecordID" value="<?php echo((isset($_GET["invalid"])?ValidatedField("productsupdate","WADAUpdateRecordID"):$_GET["ProductID"])); ?>" />
</form></div><div id="Update_Basic_Default_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('Update_Basic_Default', 'Update_Basic_Default_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:Slate']);
</script>
<div id="Update_Basic_Default_ProgressMessage" >
	<p style="margin:10px; padding:5px;" ><img src="../webassist/progress_bar/images/slate-largespin.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>
</div>
</div>

<script type="text/javascript">
<!--
var ProductName_Spry = new Spry.Widget.ValidationTextField("ProductName_Spry", "none", { isRequired:true , validateOn:["blur"]});
var ProductPrice_Spry = new Spry.Widget.ValidationTextField("ProductPrice_Spry", "currency", { format:'comma_dot', isRequired:true , validateOn:["blur"]});
var ProductRetailPrice_Spry = new Spry.Widget.ValidationTextField("ProductRetailPrice_Spry", "currency", { format:'comma_dot', isRequired:false , validateOn:["blur"]});
var ProductWeight_Spry = new Spry.Widget.ValidationTextField("ProductWeight_Spry", "real", { isRequired:false , validateOn:["blur"]});
//-->
</script><!-- InstanceEndEditable --></div>
        </div>
        </div>
    </div>
    <!--
<div id="dialog" title="Hello, Hello, Twisted Transistor">
	<p>Chameleon Circuit features unlimited color schemes. Try moving the color sliders on the top right corner of your screen and see how you would like YOUR theme to be!</p>
</div>
-->
<?php include("footer.php") ?>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($WADAProducts);
?>
<?php
mysql_free_result($WADAMenuProduct_Cat_id);
?>
